﻿<UserControl x:Class="Arma3BEClient.ServerInfoControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
             xmlns:local="clr-namespace:Arma3BEClient.Grids"
             xmlns:converters="clr-namespace:Arma3BEClient.Converters"
             xmlns:chat="clr-namespace:Arma3BEClient.Chat"
             mc:Ignorable="d" >

    <UserControl.Resources>
        <Style TargetType="{x:Type xcdg:GroupByControl}">
            <Setter Property="Visibility" Value="Collapsed"/>
        </Style>

        <converters:InverseBooleanConverter x:Uid="local:InverseBooleanConverter_1" x:Key="InverseBooleanConverter" />
        <converters:BrushColorConverter x:Uid="local:BrushColorConverter_1" x:Key="BrushColorConverter" />
        <converters:BoolToVisibilityConverter x:Uid="local:BoolToVisibilityConverter_1" x:Key="BoolToVisibilityConverter" />
        <converters:BoolToVisibilityConverterInverse x:Uid="local:BoolToVisibilityConverterInverse" x:Key="BoolToVisibilityConverterInverse" />
      

    </UserControl.Resources>
    <Grid>

        <!--<Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="200"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>-->

        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>



        <TabControl >
            <TabItem Header="Session">
                <local:OnlinePlayers DataContext="{Binding PlayersViewModel}" ></local:OnlinePlayers>
            </TabItem>

            <TabItem Header="Bans">
                <local:BansControl  DataContext="{Binding BansViewModel}" ></local:BansControl>
            </TabItem>

            <TabItem Header="Admins">
                <local:AdminsControl DataContext="{Binding AdminsViewModel}" ></local:AdminsControl>
            </TabItem>

            <TabItem Header="Players">
                <local:PlayersControl DataContext="{Binding PlayerListModelView}" ></local:PlayersControl>
            </TabItem>

            <TabItem Header="Manage Server">
                <local:ManageServer DataContext="{Binding ManageServerViewModel}"></local:ManageServer>
            </TabItem>
        </TabControl>


        <GridSplitter Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Center" Width="5" ></GridSplitter>


        <chat:ChatControl Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  DataContext="{Binding ChatViewModel}"></chat:ChatControl>

        <StatusBar Grid.Row="1" Grid.ColumnSpan="3" Height="20">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Connected" Visibility="{Binding Connected, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"></TextBlock>
                <TextBlock Foreground="Red" Text="Disonnected" Visibility="{Binding Connected, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverterInverse}}"></TextBlock>
            </StackPanel>
        </StatusBar>
    </Grid>
</UserControl>
